﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Marmat.Common.Http
{

    /// <summary>
    /// 动作过滤器
    /// </summary>
    public class ActionFilterAttribute : Attribute, IActionFilter
    {
        /// <summary>
        /// 操作执行前做的事情
        /// </summary>
        /// <param name="context">当前请求的上下文。</param>
        public virtual void OnActionExecuting(ApiActionContext context)
        {
        }

        /// <summary>
        /// 操作执行后做的事情
        /// (此处不可修改返回结果)。
        /// </summary>
        /// <param name="context">当前请求的上下文。</param>
        public virtual void OnActionExecuted(ApiActionContext context)
        {
        }
    }
}
